package chap3_14;

import java.util.Scanner;

public class Exer3_14_3 {
    public static void main(String[] args) {
        double[]score=new double[15];
        String[]name=new String[15];
        Scanner input =new Scanner(System.in);
        for(int i=0;i<score.length;i++){
            System.out.println("请输入第"+(i+1)+"名学生的名字：");
            name[i]=input.next();
            while(true){
                System.out.println("请输入第"+(i+1)+"名学生的成绩：");
                score[i]=input.nextDouble();
                if(score[i]>=0&&score[i]<=100){
                    break;
                }
                System.out.println("输入错误，请输入0到100的数字");
            }
        }
        System.out.println("姓名\t分数");
        for(int j=0;j<score.length;j++){
            System.out.print(name[j]+":\t");
            System.out.println(score[j]);
        }
    }
}
